#pragma once
#include<stdio.h>
#include<stdlib.h>
#include<assert.h>
typedef int type;
typedef struct leadtree
{
	type val;
	int ltag;
	int rtag;
	struct leadtree* left;
	struct leadtree* right;
}leadtree;
void creat(leadtree** root);
void leadfront(leadtree** root);
void leadmid(leadtree** root);
void leadback(leadtree** root);
void traversefront(leadtree** root);
void traversemid(leadtree** root);
void traverseback(leadtree** root);